﻿@using DocProcessingWorkflow.Resources.JobsAdmin
@using DocProcessingWorkflow.Models.MailSortSetting
@model MailSortSettingViewModel
@using (Html.BeginForm(null, null, FormMethod.Post, new { id = "__AjaxAntiForgeryForm" }))
{
  @Html.AntiForgeryToken()

  <div class="row">
    <div class="col-md-12">
      <h2>@AddMailSortSetting.PageTitle.ToUpper()
        <span class="nav pull-right">
          @Html.ActionLink("Mail Sort Settings", "MailSortSettings")
        </span>
      </h2>
    </div>
  </div>
  <div id="Message" class="alert alert-danger">
    @{
      var errorMessages = TempData["errorMessages"] as List<String>;
      if (errorMessages != null && errorMessages.Any())
      {
        var encodedErrorMessages = errorMessages.Select(Html.Encode);
        var errorHtml = String.Join("<BR />", encodedErrorMessages);
        @Html.Raw(errorHtml)
      }
    }
  </div>
  <div class="row">
    <div class="col-md-6 form-horizontal">
      <div class="form-group">
        @Html.LabelFor(x => x.TNTDepot, AddMailSortSetting.TNTDepot, new { @class = "col-sm-3" })
        <div class="col-sm-9">
          @Html.TextBoxFor(x => x.TNTDepot, new { @class = "form-control" })
        </div>
      </div>
      <div class="form-group">
        @Html.LabelFor(x => x.TNTMailingHouse, AddMailSortSetting.TNTMailingHouse, new { @class = "col-sm-3" })
        <div class="col-sm-9">
          @Html.TextBoxFor(x => x.TNTMailingHouse, new { @class = "form-control" })
        </div>
      </div>
      <div class="form-group">
        @Html.LabelFor(x => x.TNTClientCode, AddMailSortSetting.TNTClientCode, new { @class = "col-sm-3" })
        <div class="col-sm-9">
          @Html.TextBoxFor(x => x.TNTClientCode, new { @class = "form-control" })
        </div>
      </div>
      <div class="form-group">
        @Html.LabelFor(x => x.TNTJobReference, AddMailSortSetting.TNTJobReference, new { @class = "col-sm-3" })
        <div class="col-sm-9">
          @Html.TextBoxFor(x => x.TNTJobReference, new { @class = "form-control" })
        </div>
      </div>
      <div class="form-group">
        @Html.LabelFor(x => x.NexdoxMailsortService, AddMailSortSetting.NexdoxMailsortService, new { @class = "col-sm-3" })
        <div class="col-sm-9">
          @Html.TextBoxFor(x => x.NexdoxMailsortService, new { @class = "form-control" })
        </div>
      </div>
      <div class="form-group">
        @Html.LabelFor(x => x.Largeletter, AddMailSortSetting.LargeLetter, new { @class = "col-sm-3" })
        <div class="col-sm-1">
          @Html.CheckBoxFor(x => x.Largeletter, new { @class = "form-control" })
        </div>
      </div>
      <div class="form-group">
        @Html.LabelFor(x => x.FixedWeight_NoOuter, AddMailSortSetting.FixedWeight, new { @class = "col-sm-3" })
        <div class="col-sm-9">
          @Html.TextBoxFor(x => x.FixedWeight_NoOuter, new { @class = "form-control" })
        </div>
      </div>
      <input type="submit" class="btn btn-page pull-right" value="@AddMailSortSetting.Submit" />
    </div>
  </div>
}